package com.yuxin.tongyi.lsll.sub;



import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.WindowManager;

import com.yuxin.tongyi.lsll.common.Constants;

public class BaseActivity extends Activity {

	public boolean onCreateOptionsMenu(Menu menu) {
		menu.add(0, Constants.MENU_ITEM_CLOSE, 1, "返回主菜单");
		return super.onCreateOptionsMenu(menu);
	}

	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case Constants.MENU_ITEM_CLOSE:
			finish();
			break;
		default:
			break;
		}
		return super.onOptionsItemSelected(item);
	}

	private void brightnessMax() {    
	     WindowManager.LayoutParams lp = getWindow().getAttributes();    
	     lp.screenBrightness = 1.0f;    
	     getWindow().setAttributes(lp);    
	}  
}
